<%@ page  pageEncoding="UTF-8"%>
<%@ page import = "java.util.*" %>
<%@ page import = "java.awt.*" %> 
<%@ page import = "com.synchrobit.synchroflow.enactmentservice.processmonitor.*" %>
<%@ page import="com.synchrobit.synchroflow.api.util.RMIManager"  %>
<%@ page import="com.synchrobit.synchroflow.api.web.PropertyServiceBean" %>
<%@ page import="com.synchroflow.common.*"  %>
<%@ page import="com.synchrobit.synchroflow.api.util.StringTools" %>
<%@ page import="com.synchroflow.orgInterface.OrgManager"  %>
<%@ page import="com.synchrobit.synchroflow.organization.orgClass.User" %> 

<html>
<head>
<title>
<%=I18NTools.getString("com.synchroflow.frame.resource","jpgView_title")%>
</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<meta name="Microsoft Border" content="none">
<link rel="stylesheet" href="style/newobrs_style_001.css">
<link href="total.css" rel="stylesheet" type="text/css">
<style type=text/css>
td,div  { font: normal 12px; }
.menu_board  { background-color: #CCCCCC; width: 82px; border-top: 2px solid white; padding: 2px; }  
.menu_normal  { background-color: #CCCCCC; border: 1px solid #CCCCCC; }  
.menu_over  { cursor: hand; background-color: #DDDDDD; border: 1px solid #999999; }  
</style>
<link href="../../../css/total.css" rel="stylesheet" type="text/css">
</head>

<%
String contextPath=request.getContextPath();
//ReadXmlConfig confg=ReadXmlConfig.getInstance();
//String enactmentAPI ="rmi://127.0.0.1:8020/monitormi";
//String enactmentAPI =confg.getMonitorrimi();
//out.println(enactmentAPI);
%>
<body>

<%!
        /*OrgManager orgManager=new OrgManager();
		 User curUser=orgManager.getUser(Integer.parseInt(participant[i]));
		  if (curUser!=null)
		  {
		  	participant[i]=curUser.getUname();
		  }*/
		  
        public int[] getPoint(String restLine) {
        StringTokenizer st = new StringTokenizer(restLine, ",");
        
        int[] point = new int[2];
        int i = 0;
        while (st.hasMoreElements()) {
            String pos = st.nextToken();
            point[i] = Integer.parseInt(pos);
            i++;

        }

        return point;

    }
%>

<%!
       public int[][] modifyPoint(int[][] point) {
        int newPoint[][] = new int[2][];
        int[] ToPoint = new int[2];
        int[] FromPoint = new int[2];
  
        int step = 18;
        int fromX = point[0][0];
        int toX = point[1][0];
        int fromY = point[0][1];
        int toY = point[1][1];

        int mNewToX = 0;
        int mNewFromX = 0;
        int mNewToY = 0;
        int mNewFromY = 0;

        if (toY == fromY) { 
            if (toX > fromX) { 
                mNewToX = toX - step;
                mNewToY = toY;
                mNewFromX = fromX + step;
                mNewFromY = fromY;
            } else { 
                mNewToX = toX + step;
                mNewToY = toY;
                mNewFromX = fromX - step;
                mNewFromY = fromY;

            }
        }

        else if (toX == fromX) { 

            if (toY > fromY) { 
                mNewToY = toY - step;
                mNewToX = toX;
                mNewFromY = fromY + step;
                mNewFromX = fromX;

            } else { 
                mNewToY = toY + step;
                mNewToX = toX;
                mNewFromY = fromY - step;
                mNewFromX = fromX;

            }

        }

        else {

            double k = (double) (toY - fromY) / (double) (toX - fromX);
            if (k > 0 && toX > fromX) { 
                
                int newToX = toX - fromX;
                int newToY = toY - fromY;
                
                double tranLength = Math.sqrt(newToX * newToX + newToY * newToY);
                

                double ty0 = (((tranLength - step) / tranLength) * newToY);
                double tx0 = Math.sqrt((tranLength - step) * (tranLength - step) -
                                       ty0 * ty0);

                

                double fy0 = ((step / tranLength) * newToY);
                double fx0 = Math.sqrt(step * step - fy0 * fy0);

                
                mNewFromX = (int) (fx0 + fromX);
                mNewFromY = (int) (fy0 + fromY);
                mNewToX = (int) (tx0 + fromX);
                mNewToY = (int) (ty0 + fromY);

            } else if (k > 0 && toX < fromX) { 
                
                int newFromX = fromX - toX;
                int newFromY = fromY - toY;
                
                double tranLength = Math.sqrt(newFromX * newFromX +
                                              newFromY * newFromY);

                

                double ty0 = ((step / tranLength) * newFromY);
                double tx0 = Math.sqrt(step * step - ty0 * ty0);

               

                double fy0 = (((tranLength - step) / tranLength) * newFromY);
                double fx0 = Math.sqrt((tranLength - step) * (tranLength - step) -
                                       fy0 * fy0);

                
                mNewFromX = (int) (fx0 + toX);
                mNewFromY = (int) (fy0 + toY);
                mNewToX = (int) (tx0 + toX);
                mNewToY = (int) (ty0 + toY);

            } else if (k < 0 && toX > fromX) { 

                
                int newToX = toX - fromX;
                int newToY = 0;
                int newFromY = fromY - toY;
                int newFromX = 0;
                
                double tranLength = Math.sqrt(newFromY * newFromY +
                                              newToX * newToX);
                

                double ty0 = ((step / tranLength) * newFromY);
                double tx0 = newToX - Math.sqrt(step * step - ty0 * ty0);

                

                double fy0 = (((tranLength - step) / tranLength) * newFromY);
                double fx0 = newToX -
                             Math.sqrt((tranLength - step) * (tranLength - step) -
                                       fy0 * fy0);

                
                mNewFromX = (int) (fx0 + fromX);
                mNewFromY = (int) (fy0 + toY);
                mNewToX = (int) (tx0 + fromX);
                mNewToY = (int) (ty0 + toY);
            } else if (k < 0 && toX < fromX) { 

                
                int newToX = 0;

                int newToY = toY - fromY;
                int newFromY = 0;
                int newFromX = fromX - toX;
                
                double tranLength = Math.sqrt(newFromX * newFromX +
                                              newToY * newToY);
                

                double tx0 = ((step / tranLength) * newFromX);
                double ty0 = newToY - Math.sqrt(step * step - tx0 * tx0);

                

                double fx0 = (((tranLength - step) / tranLength) * newFromX);
                double fy0 = newToY -
                             Math.sqrt((tranLength - step) * (tranLength - step) -
                                       fx0 * fx0);

                
                mNewFromX = (int) (fx0 + toX);
                mNewFromY = (int) (fy0 + fromY);
                mNewToX = (int) (tx0 + toX);
                mNewToY = (int) (ty0 + fromY);

            }

        }
        ToPoint[0] = mNewToX;
        ToPoint[1] = mNewToY;
        FromPoint[0] = mNewFromX;
        FromPoint[1] = mNewFromY;
        newPoint[0] = FromPoint;
        newPoint[1] = ToPoint;

        return newPoint;

    }
%>
<%!
      Vector x0pos=new Vector();
	  Vector y0pos=  new Vector();
	  Vector x1pos=new Vector();
	  Vector y1pos=  new Vector();
	  Vector trans_id=  new Vector();
	  Vector trans_name= new Vector();

      public void drawTra( String transdefID,String name,
                         int[][] linePoint, int i) {
	

        if (i != 4) { 
		 int[][] newPoint = modifyPoint(linePoint);

		x0pos.add(new Integer(newPoint[0][0]));
		y0pos.add(new Integer(newPoint[0][1]));
		x1pos.add(new Integer(newPoint[1][0]));
	    y1pos.add(new Integer(newPoint[1][1]));
		trans_id.add(transdefID);
        trans_name.add(name);
	  } 
		  
		  else if (i == 4) { 

            int[][] newLinePoint = { {linePoint[0][0], linePoint[0][1]},
                                   {linePoint[1][0], linePoint[1][1]}
            };
            int[][] newPoint = modifyPoint(newLinePoint);
            x0pos.add(new Integer(newPoint[0][0]));
			y0pos.add(new Integer(newPoint[0][1]));
			x1pos.add(new Integer(newPoint[1][0]));
		    y1pos.add(new Integer(newPoint[1][1]));
			trans_id.add(transdefID);
            trans_name.add(name);
         }
    }
 
 %>



<%
 
    String fw=request.getParameter("fw");
    if(fw==null||fw.length()<0||fw.equals("")||fw.equals("null"))
	{
   
    }
    else
	{
		String  workitem_id_temp =request.getParameter("workitem_id");
		int workitem_id = Integer.parseInt(workitem_id_temp);
		try
		{   
		
		//	  ProcessMonitor pm = MonitorConnection.getProcessMonitor(enactmentAPI);
			 ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
			  pm.completeWorkItem(workitem_id);
			  out.println("<script type=\"text/javascript\">"); 
			  out.println("alert('"+I18NTools.getString("com.synchroflow.frame.resource","jpgView_done")+"');window.close();");
			  out.println("</script>");
		 } 
		 catch (Exception e) 
		{
			System.out.println(I18NTools.getString("com.synchroflow.frame.resource","complete_work_err")+e);
		}
    
    }

%>


<%    

       String fun=request.getParameter("fun");
        if(fun==null||fun.length()<0||fun.equals("")||fun.equals("null"))
		{
		}
		else
		{
        String activityIns_Id = request.getParameter("activityInsId");
        
		int activityInsId=0;

		if(activityIns_Id!=null){
		
		  activityInsId = Integer.parseInt(activityIns_Id);
		}
       
		String userName=request.getParameter("userName");


       if(fun.equals("c")){
		
		try{   
		//	  ProcessMonitor pm = MonitorConnection.getProcessMonitor(enactmentAPI);
		 		ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
			  pm.completeActivity(activityInsId,userName);
			  out.println("<script type=\"text/javascript\">"); 
              out.println("alert('"+I18NTools.getString("com.synchroflow.frame.resource","jpgView_ok")+"');window.close();");
		      out.println("</script>");
  
		  } 
	 
		 catch (Exception e) 
		{
			System.out.println(I18NTools.getString("com.synchroflow.frame.resource","complete_act_err")+e);
		}
			
	  }

		   if(fun.equals("s")){
			
			try{   
	//		  ProcessMonitor pm = MonitorConnection.getProcessMonitor(enactmentAPI);
			   ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
			  pm.suspendActivity(activityInsId,userName);
              out.println("<script type=\"text/javascript\">"); 
              out.println("alert('"+I18NTools.getString("com.synchroflow.frame.resource","jpgView_hune")+"');window.close();");
		      out.println("</script>");
				  
			  } 
		 
			 catch (Exception e) 
			{
				 System.out.println(I18NTools.getString("com.synchroflow.frame.resource","putup_act_err")+e);
				
			}
				
		  }

		  if(fun.equals("r")){
				
				try{   
		//		 ProcessMonitor pm = MonitorConnection.getProcessMonitor(enactmentAPI);
				 ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
				 pm.resumeActivity(activityInsId,userName);
				 out.println("<script type=\"text/javascript\">"); 
                 out.println("alert('"+I18NTools.getString("com.synchroflow.frame.resource","jpgView_reset")+"');window.close();");
		         out.println("</script>");
					  
				  } 
			 
				 catch (Exception e) 
				{
					System.out.println(I18NTools.getString("com.synchroflow.frame.resource","comeback_act_err")+e);
				}
					
			  }
         if(fun.equals("st")){
				
			try{   
		    
              String id=request.getParameter("processInsId");
            
			  int processInsId = Integer.parseInt(id);
            
			  String activity_id=request.getParameter("activityDefid");

			  int activityDefid = Integer.parseInt(activity_id);
           
			  int flowId=0;

			//	 ProcessMonitor pm = MonitorConnection.getProcessMonitor(enactmentAPI);
				 ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
				 pm.startActivity(processInsId,activityDefid,flowId,userName);
				 out.println("<script type=\"text/javascript\">");
                 out.println("alert('"+I18NTools.getString("com.synchroflow.frame.resource","jpgView_start")+"');window.close();");
		         out.println("</script>");
				 } 
			 
				 catch (Exception e) 
				{
					System.out.println(I18NTools.getString("com.synchroflow.frame.resource","start_act_err")+e);
				}
					
			  }


		  if(fun.equals("t")){
				
				try{   
		//		ProcessMonitor pm = MonitorConnection.getProcessMonitor(enactmentAPI);
				 ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
				pm.terminateActivity(activityInsId,userName);
				out.println("<script type=\"text/javascript\">"); 
                out.println("alert('"+I18NTools.getString("com.synchroflow.frame.resource","jpgView_end")+"');window.close();");
		        out.println("</script>");
					  
				  } 
			 
				 catch (Exception e) 
				{
					System.out.println(I18NTools.getString("com.synchroflow.frame.resource","terminate_act_err")+e);
				}
					
			  }


    }




%>

<%
     
      String userName=request.getParameter("userName");
      String processInsId=request.getParameter("processInsId");

      String over="";

      String process_name="";
	  String start_man="";
      int id=0; 

      if(processInsId!=null){
      id = Integer.parseInt(processInsId);
      }

      try{
//      ProcessMonitor pm = MonitorConnection.getProcessMonitor(enactmentAPI);
		 ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
		
      String pIns[] = pm.getProcessInsObject(id);

      
      process_name = pIns[0]; 
	  start_man = pIns[4]; 
		   
	 }  
	 catch (Exception e) {}
	 String State=request.getParameter("St");
	  String flag=request.getParameter("f");

       if(State==null){

		}
      else   
     {
		
		 if(flag==null){
		 
		 }
     else{
	 
	  if(flag.equals("1"))
	    {
		if(State.equals("1")||State.equals("2"))
		
		{ 
          
		  try
			  {   
	//	      ProcessMonitor pm = MonitorConnection.getProcessMonitor(enactmentAPI);
			 ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
              pm.suspendProcess(id,userName);
              out.println("<script type=\"text/javascript\">"); 
              out.println("alert('"+I18NTools.getString("com.synchroflow.frame.resource","jpgView_huneok")+"')");
		      out.println("</script>");
          } 
	        catch (Exception e) 
			{
		     out.println("<script type=\"text/javascript\">"); 
             out.println("alert('"+I18NTools.getString("com.synchroflow.frame.resource","a_exception")+e+"')");
		     out.println("</script>");
			
            }

	    }
        else 
		{
          out.println("<script type=\"text/javascript\">"); 
          out.println("alert('"+I18NTools.getString("com.synchroflow.frame.resource","jpgView_huning")+"')");
		  out.println("</script>");
        }

	 }

    if(flag.equals("2"))
		 
	 
	 {
		if(State.equals("3"))
		{ 
          
		  try
			  {
			  
		//      ProcessMonitor pm = MonitorConnection.getProcessMonitor(enactmentAPI);
			 ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
              pm.resumeProcess(id,userName);
		      out.println("<script type=\"text/javascript\">"); 
              out.println("alert('"+I18NTools.getString("com.synchroflow.frame.resource","jpgView_doneok")+"')");
			  out.println("</script>");
             } 
	        catch (Exception e) 
			{
		     out.println("<script type=\"text/javascript\">"); 
             out.println("alert('"+I18NTools.getString("com.synchroflow.frame.resource","a_exception")+e+"')");
		     out.println("</script>");
            }

	    }
       else 
		{
          out.println("<script type=\"text/javascript\">"); 
          out.println("alert('"+I18NTools.getString("com.synchroflow.frame.resource","jpgView_doneno")+"')");
		  out.println("</script>");
        }

	 }

	 if(flag.equals("3"))
	   {
		if(State.equals("1")||State.equals("2"))
		{ 
          
		  try
			  {   
		//      ProcessMonitor pm = MonitorConnection.getProcessMonitor(enactmentAPI);
			 ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
              pm.terminateProcess(id,userName);
			  over="over";
              System.out.println(I18NTools.getString("com.synchroflow.frame.resource","jpgView_endok")+id);
              out.println(I18NTools.getString("com.synchroflow.frame.resource","jpgView_return")+"<br>");
			  
		     } 
	        catch (Exception e) 
			{
			  out.println(I18NTools.getString("com.synchroflow.frame.resource","a_exception")+e);
		     
            }

	    }
       else 
		{
         out.println("<script type=\"text/javascript\">"); 
         out.println("alert('"+I18NTools.getString("com.synchroflow.frame.resource","jpgView_endno")+"')");
		 out.println("</script>");
        }

	 }
	 
}


}
 
     
      if(over.equals("over")){
	  
	  }
	  else{
	  
	   try{  

		  //if(State==null){
			   
	//	  ProcessMonitor pm =  MonitorConnection.getProcessMonitor(enactmentAPI);
		 ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
		  String pIns[] = pm.getProcessInsObject(id); 
		  State = (String)pIns[5].trim();
		 
		  } 
		  
         //}
            
         catch (Exception e) {
		 System.out.println(I18NTools.getString("com.synchroflow.frame.resource","get_state_err")+e);
         }
            if(State!=null){
            String s=State;
			
			if(State.equals("1")){
			s=I18NTools.getString("com.synchroflow.frame.resource","jpgView_init");
			}
			if(State.equals("2")){
			s=I18NTools.getString("com.synchroflow.frame.resource","jpgView_active");
			}
			if(State.equals("3")){
			s=I18NTools.getString("com.synchroflow.frame.resource","jpgView_hune");
			}
			if(State.equals("4")){
			s=I18NTools.getString("com.synchroflow.frame.resource","jpgView_over");
			}
			if(State.equals("5")){
			s=I18NTools.getString("com.synchroflow.frame.resource","jpgView_stop");
			}

			%>
			<p align="left"><strong ><font size="4"><%=I18NTools.getString("com.synchroflow.frame.resource","jpgView_title_tu")%></font></strong></p>
         
			<%}}%>
			
<%
if(!over.equals("over")){%>
<table class="TableBody" border="0"  >
<tr valign="bottom">
<td>
<table border="0" cellpadding="0" cellspacing="0" bordercolor="#99C1EE" class="TableBody">
<%
	///////////////////////////////modified by Yuan Dapeng

//	ProcessMonitor mPM = MonitorConnection.getProcessMonitor(enactmentAPI);
	 ProcessMonitor mPM= RMIManager.getInstance().getPmRmiConnection();
	String mIp=request.getServerName();
	String mPort=String.valueOf(request.getServerPort());
	String sId=processInsId;

	String[][] many=mPM.getMultiIPAndID(mIp,sId,mPort);
	
	if(many!=null){
		for(int i=0;i<many.length;i++){
	    String oneId=many[i][1];
	    String string="http://"+many[i][0]+":"+many[i][2]+contextPath;
	    System.out.println(string);
	%>	
			<tr valign="bottom">
			<td>
			<img border="1" usemap="#Map" name="images1"   style="border-color:'#99C1EE'" 
			src="<%=string%>/MonitorServerlet?pinsId=<%=oneId%>&name=<%=userName%>">
			</td>
			</tr>
	<%}
	}else{
	%>
		<tr valign="bottom">
			<td>
			<img border="1" usemap="#Map" name="images1"   style="border-color:'#99C1EE'" 
			src="<%=contextPath%>/MonitorServerlet?pinsId=<%=processInsId%>&name=<%=userName%>">
			</td>
			</tr>
	<%
	
	}
 ////////////////////////////////end by Yuan Dapeng
%>

</table>
</td>
<td>
<table vspace="bottom" class="TableBody" border="0" >
<tr valign="bottom">
<td  height='20' colspan='2'  bgcolor="#76EF5E" bordercolor="#76EF5E" width="50" ><%=I18NTools.getString("com.synchroflow.frame.resource","com_state")%></td>
</tr>
<tr valign="bottom"><td  height='20'    bgcolor="#C53712" bordercolor="#C53712" width="50"><%=I18NTools.getString("com.synchroflow.frame.resource","run_state")%></td></tr>
<tr valign="bottom"><td  height='20'   bgcolor="#375C90" bordercolor="#375C90"  width="60"><%=I18NTools.getString("com.synchroflow.frame.resource","un_run_state")%></td></tr>
</table>
</td>
</tr>
</table>
<table width="31%"  border="0" align="center" cellpadding="0" cellspacing="0">
    <tr align="center">
      <td width="25%"><input type="button" id="big"  name="big" value="<%=I18NTools.getString("com.synchroflow.frame.resource","jpgView_big")%>" onclick="big()"></td>
      <td width="25%"><input type="button" id="small" name="small" value="<%=I18NTools.getString("com.synchroflow.frame.resource","jpgView_small")%>" onclick="small()" ></td>
	 <td width="25%"><input type="button" id="back" name="back" value="<%=I18NTools.getString("com.synchroflow.frame.resource","jpgView_back")%>" onclick="window.location.reload();" ></td>

    </tr>

  </table>
  
<%}%>

<%
      java.util.List activityDefList = null; 
      java.util.List activityInsList = null;
      String ProcessState=null;

	  Vector defName=new Vector();
	  Vector defId=  new Vector();
	  Vector defType=new Vector();

      Vector Xpos=new Vector();
	  Vector Ypos=  new Vector();

	  Vector inline=  new Vector();
	  Vector inlinePosX=  new Vector();
	  Vector inlinePosY=  new Vector();
	  String sub_process="";
	  String inline_block="";

      Vector inline_defName=new Vector();
	  Vector inline_defId=  new Vector();
	  Vector inline_defType=new Vector();

      String m_id=null;
	  String process_def_id=null;

	  Object[][] sub=null;

	

	 if(over.equals("over")){
	  }
	  else{
	  
	  try{   

      //    ProcessMonitor pm =  MonitorConnection.getProcessMonitor(enactmentAPI);
      	 ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
		  String pIns[] = pm.getProcessInsObject(id); 
          ProcessState = pIns[5]; 
		   String m[] = pm.getProcessDefObject(id); 
		   m_id=m[17];
		   //System.out.println("m_id--"+m_id);
		   process_def_id=m[18];
		   //System.out.println("process_def_id--"+process_def_id);
					
		
			activityInsList = pm.getActivityList(id);

            for (int j = 0; j < activityInsList.size(); j++) {

			      Object[] ins = (Object[]) activityInsList.get(j);

				  String  ins_type= (String) ins[0]; 
				  String  ins_name= (String) ins[1]; 
				  String  ins_state = (String) ins[4]; 
				  String  flowId = (String) ins[6];    
				  String  operator = (String) ins[8]; 
				 

			}
             
			 activityDefList = pm.getActivityDefList(id);

                   Xpos.clear();
				   Ypos.clear();
				   defName.clear();
				   defId.clear();
				   defType.clear();
                   inline_defName.clear();
				   inline_defId.clear();
				   inline_defType.clear();
                   inlinePosX.clear();
				   inlinePosY.clear();
                 
			  for (int i = 0; i < activityDefList.size(); i++) {
                  Object[] def = (Object[]) activityDefList.get(i);
				  String def_id= (String) def[0]; 
				  String def_type = (String) def[1]; 
				  String def_name = (String) def[12]; 
			      int parentID = Integer.parseInt((String) def[38]); 
                  int x = Integer.parseInt((String) def[36]);
                  int y = Integer.parseInt((String) def[37]);
              
			   if(def_type.equals("9")){
			   sub_process="9";
               }
			   if(def_type.equals("8")){
			   inline_block="8";
               }

			  if(parentID==0){
			    if(!(def_type.trim().equals("12")||def_type.trim().equals("1")||def_type.trim().equals("2")||def_type.trim().equals("8")||def_type.trim().equals("9"))){
                   defName.add(def_name);
				   defId.add(def_id);
				   defType.add(def_type);

				   Xpos.add(new Integer(x));
				   Ypos.add(new Integer(y));

				  }


               if(def_type.trim().equals("8")){
			  
			       inline_defName.add(def_name);
				   inline_defId.add(def_id);
				   inline_defType.add(def_type);
                   inlinePosX.add(new Integer(x));
				   inlinePosY.add(new Integer(y));
			  }
			  } 

             else{
			  
			   inline.add(def_id);
			  
			  }
             
		      }
             
			  // add  by 7-31
              java.util.List transDefList = null;

				 
              
			transDefList = pm.getTransitionDefList(id); 

			x0pos.clear();
			y0pos.clear();
			x1pos.clear();
		    y1pos.clear();
            trans_id.clear();
			trans_name.clear();
            //inline.clear();

           for (int j = 0; j < transDefList.size(); j++) {

            Object[] curTransitionDef = (Object[]) transDefList.get(j);
            String name = (String) curTransitionDef[1]; 
            String lineArray = (String) curTransitionDef[9];
            String transdefID = (String) curTransitionDef[0]; 
            String transdefFrontID = (String) curTransitionDef[6]; 
            String transdefBackID = (String) curTransitionDef[7]; 
            StringTokenizer st = new StringTokenizer(lineArray, ";");

 

            int[] point = null;

            int[][] linePoint = new int[4][];

            int i = 0;

            while (st.hasMoreElements()) {
                String line = st.nextToken();

                if (!line.trim().equals("")) {
                    int firstTag = line.indexOf("[");
                    int endTag = line.lastIndexOf("]");
                    String restLine = line.substring(firstTag + 1, endTag);
                    point = getPoint(restLine);
                    linePoint[i] = point;
                    i++;
                }

            }
          

            String flag_front = "1";
            String flag_back = "1";

			
            for (int jj = 0; jj< inline.size(); jj++) {
               if (transdefFrontID.equals(inline.get(jj))) {
                   flag_front = "0";
                    break;
                }

            }

            

            for (int k = 0; k < inline.size(); k++) {
                if (transdefBackID.equals(inline.get(k))) {
                    flag_back = "0";
                    break;
                }

            }
         
            if (flag_front.equals("1") || flag_back.equals("1")) {
                drawTra(transdefID, name,linePoint, i);
            }
            //System.out.println("for end"+x0pos.size());
             
          }//end
       
  }
        catch (Exception e) {
		 System.out.println(I18NTools.getString("com.synchroflow.frame.resource","get_hotspot_err")+e);
       }
  }

%>

<map name="Map" id="sss">

<%

if(x0pos.size()>0){
    int len=2;

    for(int xx=0;xx<x0pos.size();xx++){

    String x0=x0pos.get(xx).toString();
	String y0=y0pos.get(xx).toString();
	String x1=x1pos.get(xx).toString();
	String y1=y1pos.get(xx).toString();
  
    int m0,m1,m2,m3,m4,m5,m6,m7;

    if(x0.equals(x1)){
     m0=Integer.parseInt(x0);
	 m1=Integer.parseInt(y0);
	 m2=Integer.parseInt(x1);
	 m3=Integer.parseInt(y1);
     m5=m0-len;
     m4=m0+len;
     m7=m2-len;
     m6=m2+len;
//	 out.println("<area shape='poly' coords='"+m5+", "+m1+","+m4+","+m1+","+m6+","+m3+","+m7+", "+m3+"' href=\"javascript:p_tra('"+m_id+"','"+process_def_id+"','"+(String)trans_id.get(xx)+"');\" alt='"+I18NTools.getString("com.synchroflow.frame.resource","lookup_con")+"'>");
	 
	 }
	 if(y0.equals(y1)){

	 m0=Integer.parseInt(x0);//1,7
     m1=Integer.parseInt(y0);//
	 m2=Integer.parseInt(x1);//3,5
	 m3=Integer.parseInt(y1);//
     m5=m1-len;//2
     m4=m1+len;//8
     m7=m3-len;//4
     m6=m3+len;//6
//     out.println("<area shape='poly' coords='"+m0+", "+m5+","+m2+","+m7+","+m2+","+m6+","+m0+", "+m4+"' href=\"javascript:p_tra('"+m_id+"','"+process_def_id+"','"+(String)trans_id.get(xx)+"');\" alt='"+I18NTools.getString("com.synchroflow.frame.resource","lookup_con")+"'>");
   }
   else{

        m0=Integer.parseInt(x0);//1,7
		m1=Integer.parseInt(y0);//
        m2=Integer.parseInt(x1);//3,5
        m3=Integer.parseInt(y1);//
		m5=m1-len;//2
		m4=m1+len;//8
		m7=m3-len;//4
		m6=m3+len;//6
//		out.println("<area shape='poly' coords='"+m0+", "+m5+","+m2+","+m7+","+m2+","+m6+","+m0+", "+m4+"' href=\"javascript:p_tra('"+m_id+"','"+process_def_id+"','"+(String)trans_id.get(xx)+"');\" alt='"+I18NTools.getString("com.synchroflow.frame.resource","lookup_con")+"'>");
  }
	}

}
%>
<%

if(Xpos.size()>0){
    int l=17;
	for(int x=0;x<Xpos.size();x++){
    String n1=Xpos.get(x).toString();
	String n2=Ypos.get(x).toString();
    int m1=l+Integer.parseInt(n1);
	int m2=l+Integer.parseInt(n2);
    out.println("<area shape='circle' coords='"+m1+","+m2+",13'>");
	
	}

}
%>
<%

if(inlinePosX.size()>0){
    int s=17;
	for(int m=0;m<inlinePosX.size();m++){
    String i1=inlinePosX.get(m).toString();
	String i2=inlinePosY.get(m).toString();
    int p1=s+Integer.parseInt(i1);
	int p2=s+Integer.parseInt(i2);
    out.println("<area shape='circle' coords='"+p1+","+p2+",13'   href='p_inline_jpg.jsp?processInsId="+processInsId+"&userName="+userName+"&pid="+inline_defId.get(m)+"' alt='"+I18NTools.getString("com.synchroflow.frame.resource","lookup_act")+"' target='blank'>");
  }
  }
%>
</map>
</p>
<br>
<br>
<p align="left" ><strong><font size="4"  >
<%=I18NTools.getString("com.synchroflow.frame.resource","processView_attribute")%></font></strong>
</p>
<%
   try
   {
  //   ProcessMonitor pm = MonitorConnection.getProcessMonitor(enactmentAPI);
  	 ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
	 int ip=Integer.parseInt(processInsId);
     String proscess[]=pm.getProcessInsObject(ip);
	  out.println("<table width='920' border='1' align='left' cellpadding='0' cellspacing='0' class='TableBody' bordercolor='#99C1EE'>");
	  out.println("<tr>");
	   out.println("<td width='131' height='25' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","processView_name")+"</td>");
	   out.println("<td width='131' height='25' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","processView_id")+"</td>");
	   out.println("<td width='131' height='25' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","processView_start")+"</td>");
	   out.println("<td width='131' height='25' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","processView_end")+"</td>");
	   out.println("<td width='131' height='25' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","processView_men")+"</td>");
	   out.println("<td width='131' height='25' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","processView_state")+"</td>");
	   out.println("<td width='131' height='25' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","processView_de")+"</td>");
	    out.println("</tr>");
		out.println("<tr>");
		String po=null;
	     for(int i=0;i<=proscess.length-1;i++)
		{ 
		    po=proscess[i];
		   if(po==null||po.length()<0||po.equals("")||po.equals("null"))
		   {
		      out.println("<td width='131' height='25' align='center' >"+I18NTools.getString("com.synchroflow.frame.resource","info_null")+"</td>");
		   }
		   else
		   {
		     if(po.length()>10&&i==6)
			  {
				
			    out.println("<td height='25' width='131' align='center'/>");
			  }
			  else
			  {
			    out.println("<td width='131' height='25' align='center'  >"+po+"</td>");
		        
			  }
		   }
		   
		}
		  out.println("</tr>");
		  out.println("</table>");
		  out.println("<br>");
		  out.println("<br>");
		  out.println("<br>");

   }
   catch(Exception ex)
   {
      ex.printStackTrace();
   } 

%>
<br>
<br>
<br>
<p  align="left" ><strong><font size="4"><%=I18NTools.getString("com.synchroflow.frame.resource","processView_dt")%></font></strong></p>
<%
               
        try
	   {
	     int iid = Integer.parseInt(processInsId);
		 session.setAttribute("relevantData_id",new Integer(iid));
		 Object[][] ains=null;
		  String[] a1=null; 
		  String name3="";
		  String value="";
		  		
	//	  ProcessMonitor pm = MonitorConnection.getProcessMonitor(enactmentAPI);
		 ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
          ains  = pm.getRelevantData(iid);     
		  a1 = new String[ains.length];
		  if(ains.length>1)
		 {
			 
			out.println("<form name='form' method='post' action='p_relevantData.jsp?relevant_flag=1' align='left' target='mainFrame' >");
			out.println("<table width='920' border='1'  cellpadding='0' class='TableBody' cellspacing='0' bordercolor='#99C1EE'>");
			out.println("<tr align='left'>");
			out.println("<td width='306' align='center' height='25' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","global_name")+"</td>");
			out.println("<td width='306' align='center' height='25' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","global_type")+"</td>");
			out.println("<td width='306' align='center' height='25' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","global_value")+"</td>");
			out.println("</tr>");
	 for (int i = 0; i < ains.length; i++)
	 {
		  name3=ains[i][0].toString();
		  a1[i] = name3;
		 // System.out.println("name["+i+"] = "+name);
		  String type=((String)ains[i][1]).trim();
		  if(ains[i][2]==null){
		  value="";
		  }
		  else{
		  value=ains[i][2].toString();
		 }
		  if(type.equals("1"))
			 type="short";
		  if (type.equals("2"))
			 type="int";
		  if (type.equals("3"))
			 type="long";
		  if (type.equals("4"))
			 type="String";
		  if (type.equals("5"))
			 type="char";
		  if (type.equals("6"))
			 type="float";
		  if (type.equals("7"))
			  type="double";
		  if (type.equals("8"))
			  type="boolean";
			  out.println(" <tr>");
			   out.println("<td align='center' height='25' width='306'   >"+name3+"</td>");
			   out.println("<td align='center' height='25' width='306'  >"+type+"</td>");
			   out.println("<td align='center' height='25' width='306'  >"+value+"</td>");
			   out.println("</tr>");  
			} 
			}
			else
			{
			  out.println("<tr>");
			  out.println("<td align='center' height='40' bgcolor='#99C1EE'  ><font size='2'>" +I18NTools.getString("com.synchroflow.frame.resource","un_processView_date")+ "</font></td>");
			  out.println("</tr>");
			}
			 session.setAttribute("aaaa",a1);
			 out.println("</table>");
//			 out.println("<p align='center'>");
//			 out.println("<input type='Submit' name='Submit' value=" +I18NTools.getString("com.synchroflow.frame.resource","commit")+ " >  </td>");
//			 out.println("</p>");

			 out.println("<input type='hidden' name='processInsId' value="+processInsId+">");
			 out.println("<input type='hidden' name='userName' value="+userName+">");
			 out.println("</form>"); 
		} 
	    catch (Exception e) 
		{
		  
		 out.println(I18NTools.getString("com.synchroflow.frame.resource","un_processView_date"));

       }
      
%>

<br>
<br>
<%

      try
	  {
             String  rs[][]=null;
			 String  rs1[][]=null;
			int ddd = Integer.parseInt(processInsId);
			
		   String sql="select workitem_id,activity_ins_name, created_time,"+  
		   "participant, time_unit,time_limit,completed_time,"+
          " description,state from t_workitem_his"+
          " where process_ins_id="+processInsId;
		  
             String sql1="select workitem_id,activity_ins_name, created_time,"+ 
		   " participant, time_unit,time_limit,completed_time,"+
          " description,state from t_workitem"+
          " where process_ins_id="+processInsId;
            
	//	     ProcessMonitor pm =  MonitorConnection.getProcessMonitor(enactmentAPI);
			 ProcessMonitor pm= RMIManager.getInstance().getPmRmiConnection();
			 rs=StringTools.convert(pm.getSql(sql));
			 rs1=StringTools.convert(pm.getSql(sql1));
			  out.println("<table width='920' border='1' align='left' cellpadding='1' class='TableBody' cellspacing='0' bordercolor='#99C1EE' >");
               out.println("<tr >");
               out.println("<td height='25' width='80' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","oaWorkItemHis_id")+"</td>");
			   out.println("<td height='25' width='100' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","activity_ins_name")+"</td>");
               out.println("<td height='25' width='125' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","activity_ins_start")+"</td>");
			   out.println("<td height='25' width='80' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","activity_ins_participant")+"</td>");
			   out.println("<td height='25' width='125' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","workitem_time_unit")+"</td>");
				out.println("<td height='25' width='131' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","workitem_time_limit")+"</td>");
			   out.println("<td height='25' width='125' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","activity_ins_end")+"</td>");
			   out.println("<td height='25' width='125' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","activity_ins_description")+"</td>");
			   out.println("<td height='25' width='80' align='center' bgcolor='#EFEFEF' >"+I18NTools.getString("com.synchroflow.frame.resource","activity_ins_state")+"</td>");
			    out.println("</tr>");
			   String workid=null;
               String name=null;
			   String stratTime=null;
			   String participant=null;
			   String timeUnit=null;
			   String timeLimit=null;
			   String endTime=null;
			   String description=null;
			   String state=null;
			  if(rs!=null)
			  {
			 for(int i=0;i<rs.length;i++)
		    {
				 out.println("<tr>");
			    for( int j=0;j<rs[i].length;j++)
			    {
				   if(j==0)
					{
					   workid=rs[i][j];
					   out.println("<td height='25' width='80' align='center'  >"+workid+"</td>");
				    }
				   if(j==1)
					{
				        name=rs[i][j];
						out.println("<td height='25' width='100' align='center' >"+name+"</td>");
				    }
					if(j==2)
					{
					   stratTime=rs[i][j];
					   if(stratTime==null||stratTime.length()<0||stratTime.equals("")||stratTime.equals("null"))
						{
		      				out.println("<td width='131' height='25' align='center' >"+I18NTools.getString("com.synchroflow.frame.resource","info_null")+"</td>");
		   				}
						else
					    {
					      out.println("<td height='25' width='125' align='center' >"+stratTime+"</td>");
						}
					}
					if(j==3)
					{
					   String  strparticipant=rs[i][j];
					   if(strparticipant!=null&&strparticipant.length()>0)
					   {
					    OrgManager orgManager=new OrgManager();
		                User curUser=orgManager.getUser(Integer.parseInt(strparticipant));
		                  if (curUser!=null)
		                  {
		  	                  participant=curUser.getUname();
		                  }
		                  else
		                  {
		                  	  	participant="";
		                  }
					   }
					   else
					   {
					   	   	participant="";
					   }	
					       out.println("<td height='25' width='80' align='center' >"+participant+"</td>");
						 
					}
					if(j==4)
					{
					   timeUnit=rs[i][j];
					   if(timeUnit==null||timeUnit.length()<0||timeUnit.equals("")||timeUnit.equals("null"))
						{
		      				out.println("<td width='131' height='25' align='center' >"+I18NTools.getString("com.synchroflow.frame.resource","info_null")+"</td>");
		   				}
						else
					    {
					      out.println("<td height='25' width='125' align='center'  >"+timeUnit+"</td>");
						}
					}
					if(j==5)
					{
					   timeLimit=rs[i][j];
					   if(timeLimit==null||timeLimit.length()<0||timeLimit.equals("")||timeLimit.equals("null"))
						{
		      				out.println("<td width='131' height='25' align='center' >"+I18NTools.getString("com.synchroflow.frame.resource","info_null")+"</td>");
		   				}
						else
					   {
					     out.println("<td height='25' width='80' align='center'  >"+timeLimit+"</td>");
					   }
					}
					if(6==j)
					{
					   endTime=rs[i][j];
					   if(endTime==null||endTime.length()<0||endTime.equals("")||endTime.equals("null"))
						{
		      				out.println("<td width='131' height='25' align='center' >"+I18NTools.getString("com.synchroflow.frame.resource","info_null")+"</td>");
		   				}
						else
					    {
					     out.println("<td height='25' width='125' align='center'  >"+endTime+"</td>");
						}
					}
					if(7==j)
					{
					   description=rs[i][j];					   
					   if(description==null||description.length()==0||description.equals("")||description.equals("null"))
					   {
					   }
					   else
					   {
					      for(int m=0;m<description.length();m++)
						{
							if(description.charAt(m)=='\n')
							{
								//out.println("error");
								description=description.substring(0,m-1)+description.substring(m+1);
							}
						}
						    	
					   }
					   		
					   if(description==null||description.length()==0||description.equals("")||description.equals("null"))
						{
					       out.println("<td height='25' width='125' align='center'' >"+I18NTools.getString("com.synchroflow.frame.resource","info_null")+"</td>");
					    }
						else
						{
					       			if(description.length()<10)
						    {
					            out.println("<td height='25' width='125' align='center'   >"+description+"</td>");
							}
							else
						    {
                                out.println("<td height='25' width='125' align='center'  ><a href=\"#\" onclick=\"viewDescription('"+description+"');return false;\" target=\"mainFrame\">"+I18NTools.getString("com.synchroflow.frame.resource","activity_ins_description_look")+"</a></td>");
							}
					   }
					}
					if(8==j)
					{
					   state=rs[i][j];
					   if(state.equals("1"))
					  {
							out.println("<td height='25' width='80' align='center'   >"+I18NTools.getString("com.synchroflow.frame.resource","start_state")+"</td>");
					  }
					 if(state.equals("2"))
					{
						 out.println("<td height='25' width='80' align='center'  >"+I18NTools.getString("com.synchroflow.frame.resource","run_state")+"</td>");
					}
					  if(state.equals("3"))
					  {
						  out.println("<td height='25' width='80' align='center'  >"+I18NTools.getString("com.synchroflow.frame.resource","hune_state")+"</td>");
					   }
					  if(state.equals("4"))
					 {
							out.println("<td height='25'  width='80' align='center'  >"+I18NTools.getString("com.synchroflow.frame.resource","com_state")+"</td>"); 
					  }
					   if(state.equals("5")||state.equals("6"))
					 {
						   out.println("<td height='25' width='80' align='center'  >"+I18NTools.getString("com.synchroflow.frame.resource","end_state")+"</td>");
					  }
					   if(state.equals("7"))
					   {
							 out.println("<td height='25' width='80' align='center'   >"+I18NTools.getString("com.synchroflow.frame.resource","com_state")+"</td>");
						}

					}
				}
			 out.println("</tr >");
		   }
		  
		  }
		  if(rs1!=null)
		  {
		  
		      for(int i=0;i<rs1.length;i++)
		    {
				 out.println("<tr>");
			    for( int j=0;j<rs1[i].length;j++)
			    {
				   if(j==0)
					{
					   workid=rs1[i][j];
					   out.println("<td height='25' width='80' align='center'  >"+workid+"</td>");
				    }
				   if(j==1)
					{
				        name=rs1[i][j];
						out.println("<td height='25' width='100' align='center' >"+name+"</td>");
				    }
					if(j==2)
					{
					   stratTime=rs1[i][j];
					  if(stratTime==null||stratTime.length()<0||stratTime.equals("")||stratTime.equals("null"))
					 {
		      			out.println("<td width='131' height='25' align='center' >"+I18NTools.getString("com.synchroflow.frame.resource","info_null")+"</td>");
		   			 }
					 else
					 {
					   out.println("<td height='25' width='125' align='center' >"+stratTime+"</td>");
					 }
					}
					if(j==3)
					{
					   String  strparticipant=rs1[i][j];
					   if(strparticipant!=null&&strparticipant.length()>0)
					   {
					    OrgManager orgManager=new OrgManager();
		                User curUser=orgManager.getUser(Integer.parseInt(strparticipant));
		                  if (curUser!=null)
		                  {
		  	                  participant=curUser.getUname();
		                  }
		                  else
		                  {
		                  	  participant="";
		                  }
						}
						else
						{
							participant="";
						}
					        out.println("<td height='25' width='80' align='center'  >"+participant+"</td>");
					    
					}
					if(j==4)
					{
					   timeUnit=rs1[i][j];
						if(timeUnit==null||timeUnit.length()<0||timeUnit.equals("")||timeUnit.equals("null"))
						{
		      				out.println("<td width='131' height='25' align='center' >"+I18NTools.getString("com.synchroflow.frame.resource","info_null")+"</td>");
		   				}
						else
					    {
					     out.println("<td height='25' width='125' align='center'  >"+timeUnit+"</td>");
						}
					}
					if(j==5)
					{
					   timeLimit=rs1[i][j];
					   if(timeLimit==null||timeLimit.length()<0||timeLimit.equals("")||timeLimit.equals("null"))
						{
		      				out.println("<td width='131' height='25' align='center' >"+I18NTools.getString("com.synchroflow.frame.resource","info_null")+"</td>");
		   				}
						else
					    {
					      out.println("<td height='25' width='80' align='center'  >"+timeLimit+"</td>");
					   }
					}
					if(6==j)
					{
					    endTime=rs1[i][j];
					    if(endTime==null||endTime.length()<0||endTime.equals("")||endTime.equals("null"))
						{
		      				out.println("<td width='131' height='25' align='center' >"+I18NTools.getString("com.synchroflow.frame.resource","info_null")+"</td>");
		   				}
						else
					    {
					      out.println("<td height='25' width='125' align='center'  >"+endTime+"</td>");
					    }
					}
					if(7==j)
					{
					    description=rs1[i][j];
						
						if(description==null||description.length()==0||description.equals("")||description.equals("null"))
					    {
						
						}
						else
					    {
							 for(int m=0;m<description.length();m++)
							{
								if(description.charAt(m)=='\n')
								{
									//out.println("error");
									description=description.substring(0,m-1)+description.substring(m+1);
								}
							}
						}
					   
					   if(description==null||description.length()==0||description.equals("")||description.equals("null"))
						{
					       out.println("<td height='25' width='125' align='center'  >"+I18NTools.getString("com.synchroflow.frame.resource","info_null")+"</td>");
					    }
						else
						{
					       	if(description.length()<10)
						    {
					            out.println("<td height='25' width='125' align='center'   >"+description+"</td>");
							}
							else
						    {
                                 out.println("<td height='25' width='125' align='center'  ><a href=\"#\" onclick=\"viewDescription('"+description+"');return false;\" target=\"mainFrame\">"+I18NTools.getString("com.synchroflow.frame.resource","activity_ins_description_look")+"</a></td>");
							}
					   }
					}
					if(8==j)
					{
					   state=rs1[i][j];
					   if(state.equals("1"))
					  {
							out.println("<td height='25' width='80' align='center'   >"+I18NTools.getString("com.synchroflow.frame.resource","start_state")+"</td>");
					  }
					 if(state.equals("2"))
					{
						 out.println("<td height='25' width='80' align='center'  >"+I18NTools.getString("com.synchroflow.frame.resource","run_state")+"</td>");
					}
					  if(state.equals("3"))
					  {
						  out.println("<td height='25' width='80' align='center'  >"+I18NTools.getString("com.synchroflow.frame.resource","hune_state")+"</td>");
					   }
					  if(state.equals("4"))
					 {
							out.println("<td height='25'  width='80' align='center'   >"+I18NTools.getString("com.synchroflow.frame.resource","com_state")+"</td>"); 
					  }
					   if(state.equals("5")||state.equals("6"))
					 {
						   out.println("<td height='25' width='80' align='center'  >"+I18NTools.getString("com.synchroflow.frame.resource","end_state")+"</td>");
					  }
					   if(state.equals("7"))
					   {
							 out.println("<td height='25' width='80' align='center'   >"+I18NTools.getString("com.synchroflow.frame.resource","com_state")+"</td>");
						}

					}
				}
			 out.println("</tr >");
		   } 
		   }
	
	   out.println("</table>");
	  
	  }
	  catch(Exception ex)
	  {
	     ex.printStackTrace();
	  }

%>

<form name="myForm" method="post" action="">
<input type="hidden" name="description"  value="" />
</form>

</body>

<script language="JavaScript" >  

function small(){ 
	//document.all("small").disabled=true;
	//document.all("big").disabled=false;
	var height1=images1.height            
	var width1=images1.width            
	images1.height=height1/1.05        
	images1.width=width1/1.05
	var obj=document.all("sss");
	var sublen=obj.children.length;
	//alert("sublen="+sublen);
	for(i=0;i<sublen;i++){
		//alert("for");
		var subobj=obj.children(i);
		var strCoords=subobj.coords;
		var aaray=strCoords.split(",");
		//alert(aaray.length);
		//alert("1----"+aaray);
		for( j=0;j<aaray.length;j++){
			aaray[j]=aaray[j]/1.05;
			var s=aaray.join(",");
			subobj.coords=s;
		}
		//alert("2---"+subobj.coords);
		//alert(aaray.join(","));
		//alert(s);
		//alert(subobj.coords);
	}
	//alert(subobj);  
	//alert("subojb.shape="+subobj.coords);
}  
function big(){    
	//document.all("big").disabled=true;
	//document.all("small").disabled=false;
	var height1 = images1.height;
	var width1 = images1.width;
	images1.height=height1*1.05;        
	images1.width=width1*1.05;
	var obj=document.all("sss");
	var sublen=obj.children.length;
	for(i=0;i<sublen;i++){
		var subobj=obj.children(i);
		var strCoords=subobj.coords;
		var aaray=strCoords.split(",");
		//alert(aaray.length);
		//alert("1----"+aaray);
		for(j=0;j<aaray.length;j++){
			aaray[j]=aaray[j]*1.05;
			var s=aaray.join(",");
			subobj.coords=s;
		}
		//alert("2---"+subobj.coords);
	}
}             
</script>   
<SCRIPT LANGUAGE="JavaScript">
<!--
function viewDescription(desc){
var dec = desc;
	document.myForm.description.value=dec;
	document.myForm.action="description.jsp";
	document.myForm.submit();
	//alert(document.myForm.description.value);
}  
//-->
</SCRIPT>


</html>